package com.example.tests;

import java.util.Set;

import org.testng.annotations.Test;

public class GroupRemovalTests extends TestBase {
	
	@Test
	public void testFirstGroupCanBeRemoved() throws Exception {
		Set<GroupObject> oldList = app.getGroupHelper().getGroups();
		if (oldList.size() == 0){			
			GroupObject groupObject = new GroupObject()
			.setName("")
			.setHeader("")
			.setFooter("");
			app.getGroupHelper().createGroup(groupObject);
		    oldList.add(groupObject);
		}
		//action
		/*GroupObject deletedGroup = app.getGroupHelper().getGroupRandom(oldList); //oldList.toString();
		String groupId = deletedGroup.id;*/
		app.getGroupHelper().deleteGroup(0);
				//verification
		Set<GroupObject> newList = app.getGroupHelper().getGroups();
		verifyGroupDeleted(oldList,/* deletedGroup,*/ newList);
	}

}